package com.ambimmort.shj.action.user;

import cn.net.greenet.common.db_service.BaseDao;
import cn.net.greenet.user.manage.MD5Tool;
import cn.net.greenet.user.manage.Util;
import cn.net.greenet.user.operation.UserLoginAction;
import com.ambimmort.shj.service.user.UserService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.sql.ResultSet;

/**
 * Created by Administrator on 2015/7/31.
 */
@Controller("/action/user/login.do")
public class Login {
    @Autowired
    private UserService userService;

    /**
     *
     * @param request
     * @param json
     * @return
     * @throws Throwable
     */
    @RequestMapping("/action/user/login.do")
    @ResponseBody
    public String action_UserLogin( HttpServletRequest request,@RequestParam("json") String json)  {
        System.out.println("return:"+userService.loginDomain(request, json)+"\tjson:"+json);
        return userService.loginDomain(request, json);

    }
}
